package com.jn.erp.web.api.common.controller;

import com.alibaba.fastjson2.JSONObject;
import com.jn.erp.common.core.result.AjaxResult;
import com.jn.erp.security.controller.BaseWebAuthController;
import com.jn.erp.web.api.common.entity.InteractMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/interactMessage")
public class TInteractMessageController extends BaseWebAuthController {

    @Autowired
    private com.jn.erp.web.api.common.service.InteractMessageService interactMessageService;
    /**
     * 续费提醒
     */
    @PostMapping("/renewalReminders")
    public AjaxResult renewalReminders(@RequestBody InteractMessage interactMessage) {
        interactMessage.setOrgId(Long.parseLong(loginDeptAuth()));
        interactMessage.setCreator(getUserId());
        Long aLong = interactMessageService.renewalReminders(interactMessage);
        JSONObject ajax=new JSONObject();
        ajax.put("ids", aLong);
        return success(ajax);
    }
}
